Subreports can be newly created in the main report or imported from an existing report file. If the subreport is imported from an existing report file, it can be re
Sub ReImportSubreport (pReimported as Boolean)
pReimported is an output parameter. Create a variable to hold the result of pReimported and check the value of the variable to see if the method is successful.
'Boolean value to hold the result of the ReimportSubreport method Dim bReimported As Boolean 'Call ReImportSubReport Report.Subreport1.ReimportSubreport bReimported 'If bReimported is True the subreport re-i mported successfully 'If bReimported is False the subreport failed to re-i mport If bReimported Then MsgBox "Subreport re-i mported successfully" Else MsgBox "Subreport failed to re-i mport" Exit Sub End If 'Refresh the viewer to display the updated subreport. 'Set the parameter to True if you want to update the data 'or False if you only want to refresh the report CRViewer1.RefreshEx False
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |